(function(){if(BX.user)return;BX.user={};BX.user.getOnlineStatus=function(e,t,s){e=BX.type.isDate(e)?e:BX.type.isNumber(e)?new Date(e*1e3):new Date(0);t=BX.type.isDate(t)?t:BX.type.isNumber(t)?new Date(t*1e3):new Date;s=!!s;var n={isOnline:false,status:"offline",statusText:BX.message("U_STATUS_OFFLINE"),lastSeen:e,lastSeenText:"",now:t,utc:s};if(e.getTime()===0){return n}n.isOnline=t.getTime()-e.getTime()<=parseInt(BX.message("LIMIT_ONLINE"))*1e3;n.status=n.isOnline?"online":"offline";n.statusText=BX.message("U_STATUS_"+n.status.toUpperCase());if(e.getTime()>0&&t.getTime()-e.getTime()>300*1e3){n.lastSeenText=BX.date.formatLastActivityDate(e,t,s)}return n};BX.user.getSecondsForLimitOnline=function(){return parseInt(BX.message.LIMIT_ONLINE)}})();